<?php
    if ($this->nolayout )
    {
	echo $this->layout()->content;
	exit;
    };
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml11-transitional.dtd">
<html>
<head>
    <title><?php echo $this->escape($this->title); ?></title>
    <meta http-equiv="Content-Language" content="RU" />
    <meta name="Author" content="Max Zamaliev" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="keywords" content="<?php echo $this->escape($this->keywords); ?>">
    <meta name="description" content="<?php echo $this->escape($this->description); ?>">
    <meta name="robots" content="index,all" />
    <?php $this->headLink()->appendStylesheet('/css/style.css') ?>
    <?php $this->headLink()->appendStylesheet('/css/top.css') ?>
    <?php $this->headLink()->appendStylesheet('/css/login.css') ?>
    <?php $this->headLink()->appendStylesheet('/css/advertising.css') ?>
    <?php $this->headLink()->appendStylesheet('/css/menu.css') ?>
    <?php $this->headLink()->appendStylesheet('/css/content.css') ?>
    <?php echo $this->headLink()->appendStylesheet('/css/foot.css') ?>
</head>
<body>
    <div id="div_main">
    
	<div id="div_top">&nbsp;</div>

<?php
$auth = Zend_Auth::getInstance();
if($auth->hasIdentity()) 
{
?>
    <div id="div_avatar">
	<img id="img_avatar" src="<?php echo $this->serverUrl("/icons/user_avatar.png");?>" />
	<ul id="login_toolbar_left">
	    <li>
		<a href="<?php echo $this->serverUrl("/User/info");?>"><img src="<?php echo $this->serverUrl("/icons/user_info.png");?>" title="Информация о пользователе"/></a>
	    </li>
	    <li>
		<a href="<?php echo $this->serverUrl("/User/settings");?>"><img src="<?php echo $this->serverUrl("/icons/settings.png");?>" title="Настройки пользователя"/></a>
	    </li>
	    <li>
		<a href="<?php echo $this->serverUrl("/User/logout");?>"><img src="<?php echo $this->serverUrl("/icons/logout.png");?>" title="Выход"/> </a>
	    </li>
	</ul>
    </div>
<?php
} 
else 
{
?>	
	<div id="div_login">
	    <form action="<?php echo $this->serverUrl("/User/login/");?>" method="POST">
		<table>
		    <tr>
			<td colspan="4">
			    Введите Ваш логин и пароль:
			</td>
		    </tr>
		    <tr>
			<td>Логин:</td>
    			<td><input id="input_login" type="text" name="login" /></td>
			<td>Пароль:</td>
			<td><input id="input_password" type="password" name="passwd" /></td>
		    </tr>
		    <tr>
			<td colspan="2"><a id="a_reminder" href="<?php echo $this->serverUrl("/User/reminder");?>">забыли пароль?</a></td>
			<td colspan="2" style="text-align: right;"><input id="input_submit" type="submit" value="вход" style="width: 80px;" /></td>
		    </tr>
		</table>
	    </form>
	    <div id="div_register">
		<a href="<?php echo $this->serverUrl("/User/register");?>">Регистрация</a>
	    </div>
    </div>
<?php
};
?>	

	<div id="div_menu">
	    <ul>
	        <li><a href="<?php echo $this->serverUrl("/Forum");?>">Разделы</a></li>
		<li><a href="<?php echo $this->serverUrl("/Forum/about");?>">О проекте</a></li>
	    </ul>
	    
	    <form id="form_search" name="search" action="<?php echo $this->serverUrl("/Forum/search");?>" method="post">
		<input id="input_search" type="text" name="searchstring" placeholder="Поиск по сайту" />
		<input id="input_image" type="image" name="submit" value="Поиск" src="<?php echo $this->serverUrl("/icons/search.gif");?>" />
	    </form>
	</div>
	
	<div id="div_content">&nbsp;<?php echo $this->layout()->content; ?><br /><br /><br />
</div>
	
	<div id="div_advertising">&nbsp;</div>
	<br /><br /><br />
	<div id="div_foot">
	    <p>&copy; Администрация <a href="<?php echo $this->serverUrl("/");?>" target="_blank"><?php echo(SITE_NAME); ?></a> разрешает Вам просматривать и загружать материалы данного cайта только для личного некоммерческого использования, при условии сохранения Вами всей информации об авторских правах и других сведениях, содержащихся в исходных материалах и любых их копиях.</p>
	    <p id="p_contact"><a href="mailto:postmaster@i-vostok.ru" title="Написать письмо">Администрация</a></p>
	    
	</div>
	
    </div>


    
</body>
</html>